package com.sgb.kjwl.api.service;

import com.swgk.core.base.model.entity.H5ReEntity;
import com.swgk.core.util.PickSelectEntity;
import com.sgb.kjwl.model.entity.TeamPriceItemEntity;
import com.sgb.kjwl.model.entity.TeamPriceListRequestEntity;
import com.sgb.kjwl.model.entity.packers.Packer3Entity;
import com.sgb.kjwl.model.entity.self.SelfTeamOfferEntity;
import com.swgk.core.base.model.entity.ListResponse;
import com.swgk.core.base.model.entity.BaseEntity;

import java.util.List;
import java.util.Map;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface TeamPriceAPI {

    //工队报价列表
    @POST("v2/app/packer/findPriceList")
    Call<BaseEntity<ListResponse<List<TeamPriceItemEntity>>>> findPriceList(@Body TeamPriceListRequestEntity entity);

    //首页工队报价列表
    @POST("v2/app/packer/findPriceList")
    Call<BaseEntity<ListResponse<List<Packer3Entity>>>> getfindPriceList(@Body Map entity);

    //工队报价列表
    @FormUrlEncoded
    @POST("v1/app/packer/categoryList")
    Call<BaseEntity<List<PickSelectEntity>>> getProjectFilter(@Field("areaCode") String areaCode);

    //二三级
    @FormUrlEncoded
    @POST("v1/app/packer/getSecondCategory")
    Call<BaseEntity<List<PickSelectEntity>>> getSecthiCategory(@Field("cid1") String cid);

    @FormUrlEncoded
    @POST("v2/app/packer/getOccupation")
    Call<BaseEntity<List<PickSelectEntity>>> getWorkType(@Field("areacode") String areacode,
                                                         @Field("firstCategoryNo") String firstCategoryNo,
                                                         @Field("secondCategoryNo") String secondCategoryNo,
                                                         @Field("thirdCategoryNo") String thirdCategoryNo);

    /**
     * 获取工种
     * @return
     */
    @POST("v2/app/packer/getWorkType")
    Call<BaseEntity<List<PickSelectEntity>>> getWorkType();

    //报价工队列表接口
    @GET("v2/app/packer/nameByComAndUserNo")
    Call<BaseEntity<List<PickSelectEntity>>> getNameByComAndUserNo(@Query("companyNo") String companyNo,@Query("userNo") String userNo);

    /**
     * 工种报价详情
     * @param no
     * @param areacode
     * @return
     */
    @FormUrlEncoded
    @POST("v2/app/packer/teamPriceDetail")
    Call<BaseEntity<SelfTeamOfferEntity>> getDetail(@Field("no") String no, @Field("areacode") String areacode);


    @FormUrlEncoded
    @POST("v1/app/common/getUrlSetting")
    Call<BaseEntity<H5ReEntity>> getUrlSetting(@Field("param") String param);
}
